package com.yangyu.controller;

import com.yangyu.message.user.MakeCodeVo;
import com.yangyu.message.BaseRsp;
import com.yangyu.service.RegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "验证码模块")
@RestController
public class CheckCodeController {

    @Autowired
    private RegisterService service;

    @ApiOperation("发送验证码")
    @PostMapping("/makeCheckCode")
    public BaseRsp makeCheckCode(@Validated @RequestBody MakeCodeVo makeCodeVo) {
        return service.makeCheckCode(makeCodeVo);
    }
}
